\section{ethernet.\+h File Reference}
\label{ethernet_8h}\index{ethernet.\+h@{ethernet.\+h}}


Ethernet over Ether\+C\+AT (EoE)  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ ec\+\_\+eoe\+\_\+frame\+\_\+t}
\begin{DoxyCompactList}\small\item\em Queued frame structure. \end{DoxyCompactList}\item 
struct \textbf{ ec\+\_\+eoe}
\begin{DoxyCompactList}\small\item\em Ethernet over Ether\+C\+AT (EoE) handler. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \textbf{ ec\+\_\+eoe} \textbf{ ec\+\_\+eoe\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ ec\+\_\+eoe\+\_\+init} (\textbf{ ec\+\_\+eoe\+\_\+t} $\ast$, \textbf{ ec\+\_\+slave\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em EoE constructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+eoe\+\_\+clear} (\textbf{ ec\+\_\+eoe\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em EoE destructor. \end{DoxyCompactList}\item 
\mbox{\label{ethernet_8h_ab7ba009185c67570f4c95446cee7eb76}} 
void \textbf{ ec\+\_\+eoe\+\_\+run} (\textbf{ ec\+\_\+eoe\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Runs the EoE state machine. \end{DoxyCompactList}\item 
\mbox{\label{ethernet_8h_a18fc60e72cbbc99eb59a0e43abdfe328}} 
void \textbf{ ec\+\_\+eoe\+\_\+queue} (\textbf{ ec\+\_\+eoe\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Queues the datagram, if necessary. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+eoe\+\_\+is\+\_\+open} (const \textbf{ ec\+\_\+eoe\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Returns the state of the device. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+eoe\+\_\+is\+\_\+idle} (const \textbf{ ec\+\_\+eoe\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Returns the idle state. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ethernet over Ether\+C\+AT (EoE) 



\subsection{Typedef Documentation}
\mbox{\label{ethernet_8h_a03b01351f25a9210938e676941427cf4}} 
\index{ethernet.\+h@{ethernet.\+h}!ec\+\_\+eoe\+\_\+t@{ec\+\_\+eoe\+\_\+t}}
\index{ec\+\_\+eoe\+\_\+t@{ec\+\_\+eoe\+\_\+t}!ethernet.\+h@{ethernet.\+h}}
\subsubsection{ec\+\_\+eoe\+\_\+t}
{\footnotesize\ttfamily typedef struct \textbf{ ec\+\_\+eoe} \textbf{ ec\+\_\+eoe\+\_\+t}}

\begin{DoxySeeAlso}{See also}
\doxyref{ec\+\_\+eoe}{p.}{structec__eoe} 
\end{DoxySeeAlso}


Definition at line 68 of file ethernet.\+h.



\subsection{Function Documentation}
\mbox{\label{ethernet_8h_a890ed81aeeee6742971bae174623f7d9}} 
\index{ethernet.\+h@{ethernet.\+h}!ec\+\_\+eoe\+\_\+init@{ec\+\_\+eoe\+\_\+init}}
\index{ec\+\_\+eoe\+\_\+init@{ec\+\_\+eoe\+\_\+init}!ethernet.\+h@{ethernet.\+h}}
\subsubsection{ec\+\_\+eoe\+\_\+init()}
{\footnotesize\ttfamily int ec\+\_\+eoe\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+eoe\+\_\+t} $\ast$}]{eoe,  }\item[{\textbf{ ec\+\_\+slave\+\_\+t} $\ast$}]{slave }\end{DoxyParamCaption})}



EoE constructor. 

Initializes the EoE handler, creates a net\+\_\+device and registers it.

\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em eoe} & EoE handler \\
\hline
{\em slave} & Ether\+C\+AT slave \\
\hline
\end{DoxyParams}


Definition at line 104 of file ethernet.\+c.

\mbox{\label{ethernet_8h_a2d848439972cb4dcc037a2f9bb456715}} 
\index{ethernet.\+h@{ethernet.\+h}!ec\+\_\+eoe\+\_\+clear@{ec\+\_\+eoe\+\_\+clear}}
\index{ec\+\_\+eoe\+\_\+clear@{ec\+\_\+eoe\+\_\+clear}!ethernet.\+h@{ethernet.\+h}}
\subsubsection{ec\+\_\+eoe\+\_\+clear()}
{\footnotesize\ttfamily void ec\+\_\+eoe\+\_\+clear (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+eoe\+\_\+t} $\ast$}]{eoe }\end{DoxyParamCaption})}



EoE destructor. 

Unregisteres the net\+\_\+device and frees allocated memory. 
\begin{DoxyParams}{Parameters}
{\em eoe} & EoE handler \\
\hline
\end{DoxyParams}


Definition at line 208 of file ethernet.\+c.

\mbox{\label{ethernet_8h_aac0563934b958ac04dc433e8fe442234}} 
\index{ethernet.\+h@{ethernet.\+h}!ec\+\_\+eoe\+\_\+is\+\_\+open@{ec\+\_\+eoe\+\_\+is\+\_\+open}}
\index{ec\+\_\+eoe\+\_\+is\+\_\+open@{ec\+\_\+eoe\+\_\+is\+\_\+open}!ethernet.\+h@{ethernet.\+h}}
\subsubsection{ec\+\_\+eoe\+\_\+is\+\_\+open()}
{\footnotesize\ttfamily int ec\+\_\+eoe\+\_\+is\+\_\+open (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+eoe\+\_\+t} $\ast$}]{eoe }\end{DoxyParamCaption})}



Returns the state of the device. 

\begin{DoxyReturn}{Returns}
1 if the device is \char`\"{}up\char`\"{}, 0 if it is \char`\"{}down\char`\"{} 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em eoe} & EoE handler \\
\hline
\end{DoxyParams}


Definition at line 366 of file ethernet.\+c.

\mbox{\label{ethernet_8h_a2c002900d42f291213e271b7196f991e}} 
\index{ethernet.\+h@{ethernet.\+h}!ec\+\_\+eoe\+\_\+is\+\_\+idle@{ec\+\_\+eoe\+\_\+is\+\_\+idle}}
\index{ec\+\_\+eoe\+\_\+is\+\_\+idle@{ec\+\_\+eoe\+\_\+is\+\_\+idle}!ethernet.\+h@{ethernet.\+h}}
\subsubsection{ec\+\_\+eoe\+\_\+is\+\_\+idle()}
{\footnotesize\ttfamily int ec\+\_\+eoe\+\_\+is\+\_\+idle (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+eoe\+\_\+t} $\ast$}]{eoe }\end{DoxyParamCaption})}



Returns the idle state. 


\begin{DoxyRetVals}{Return values}
{\em 1} & The device is idle. \\
\hline
{\em 0} & The device is busy. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em eoe} & EoE handler \\
\hline
\end{DoxyParams}


Definition at line 378 of file ethernet.\+c.

